import cryptoFramework from "@ohos.security.cryptoFramework"

export class DataBlob implements cryptoFramework.DataBlob {
  data: Uint8Array;
  constructor(data:Uint8Array) {
    this.data = data;
  }
}

export interface SymKey extends cryptoFramework.SymKey {
}

export interface PriKey extends cryptoFramework.PriKey {
}

export interface PubKey extends cryptoFramework.PubKey {
}

export interface KeyPair extends cryptoFramework.KeyPair {
}


export enum CipherMode {
  MODE_ECB = 1,
  MODE_CBC = 2,
  MODE_CTR = 3,
  MODE_OFB = 4,
  MODE_CCM = 31,
  MODE_GCM = 32
}

/**
 * @name PaddingMode
 * @since 8
 * @syscap SystemCapability.Security.Huks
 */
export enum PaddingMode {
  PADDING_NONE = 0,
  PADDING_OAEP = 1,
  PADDING_PSS = 2,
  PADDING_PKCS1_V1_5 = 3,
  PADDING_PKCS5 = 4,
  PADDING_PKCS7 = 5
}

/**
 * @name KeySize
 * @since 8
 * @syscap SystemCapability.Security.Huks
 */
export enum KeySize {
  RSA_KEY_SIZE_512 = 512,
  RSA_KEY_SIZE_768 = 768,
  RSA_KEY_SIZE_1024 = 1024,
  RSA_KEY_SIZE_2048 = 2048,
  RSA_KEY_SIZE_3072 = 3072,
  RSA_KEY_SIZE_4096 = 4096,
  ECC_KEY_SIZE_224 = 224,
  ECC_KEY_SIZE_256 = 256,
  ECC_KEY_SIZE_384 = 384,
  ECC_KEY_SIZE_521 = 521,
  AES_KEY_SIZE_128 = 128,
  AES_KEY_SIZE_192 = 192,
  AES_KEY_SIZE_256 = 256,
  AES_KEY_SIZE_512 = 512,
  CURVE25519_KEY_SIZE_256 = 256,
  DH_KEY_SIZE_2048 = 2048,
  DH_KEY_SIZE_3072 = 3072,
  DH_KEY_SIZE_4096 = 4096,
  /**
   * @name SM2_KEY_SIZE_256
   * @since 9
   * @syscap SystemCapability.Security.Huks
   */
  SM2_KEY_SIZE_256 = 256,
  /**
   * @name SM4_KEY_SIZE_128
   * @since 9
   * @syscap SystemCapability.Security.Huks
   */
  SM4_KEY_SIZE_128 = 128
}


/**
 * @name ImportKeyType
 * @since 9
 * @syscap SystemCapability.Security.Huks
 */
export enum ImportKeyType {
  KEY_TYPE_PUBLIC_KEY = 0,
  KEY_TYPE_PRIVATE_KEY = 1,
  KEY_TYPE_KEY_PAIR = 2
}